package com.ruoyi.play.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.play.domain.PlayOperaLog;
import com.ruoyi.play.mapper.PlayOperaLogMapper;
import com.ruoyi.play.service.IPlayOperaLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 片单剪辑发布记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-20
 */
@Service
public class PlayOperaLogServiceImpl implements IPlayOperaLogService 
{
    @Autowired
    private PlayOperaLogMapper playOperaLogMapper;

    /**
     * 查询片单剪辑发布记录
     * 
     * @param id 片单剪辑发布记录主键
     * @return 片单剪辑发布记录
     */
    @Override
    public PlayOperaLog selectPlayOperaLogById(Long id)
    {
        return playOperaLogMapper.selectPlayOperaLogById(id);
    }

    /**
     * 查询片单剪辑发布记录列表
     * 
     * @param playOperaLog 片单剪辑发布记录
     * @return 片单剪辑发布记录
     */
    @Override
    public List<PlayOperaLog> selectPlayOperaLogList(PlayOperaLog playOperaLog)    {
        return playOperaLogMapper.selectPlayOperaLogList(playOperaLog);
    }

    /**
     * 新增片单剪辑发布记录
     * 
     * @param playOperaLog 片单剪辑发布记录
     * @return 结果
     */
    @Override
    public int insertPlayOperaLog(PlayOperaLog playOperaLog)
    {
        playOperaLog.setCreateTime(DateUtils.getNowDate());
        return playOperaLogMapper.insertPlayOperaLog(playOperaLog);
    }

    /**
     * 修改片单剪辑发布记录
     *
     * @param playOperaLog 片单剪辑发布记录
     * @return 结果
     */
    @Override
    public int updatePlayOperaLog(PlayOperaLog playOperaLog) {
        playOperaLog.setUpdateTime(DateUtils.getNowDate());
        return playOperaLogMapper.updatePlayOperaLog(playOperaLog);
    }

    /**
     * 批量删除片单剪辑发布记录
     * 
     * @param ids 需要删除的片单剪辑发布记录主键
     * @return 结果
     */
    @Override
    public int deletePlayOperaLogByIds(Long[] ids)
    {
        return playOperaLogMapper.deletePlayOperaLogByIds(ids);
    }

    /**
     * 删除片单剪辑发布记录信息
     * 
     * @param id 片单剪辑发布记录主键
     * @return 结果
     */
    @Override
    public int deletePlayOperaLogById(Long id)
    {
        return playOperaLogMapper.deletePlayOperaLogById(id);
    }
}
